package com.iflytek.controller;

import com.iflytek.pojo.Equipment;
import com.iflytek.service.EquipmentService;
import com.iflytek.utils.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/equipment")
public class EquipmentController {

    @Autowired
    private EquipmentService equipmentService;


    @GetMapping("/one/{id}")
    public ResultUtil getOne(@PathVariable("id") Integer eid) {
        Equipment equipment = equipmentService.getOne(eid);
        return ResultUtil.ok(equipment);
    }

}
